<div ng-controller="LabelCtrl" ng-init="addAction()" class="sui-form form-horizontal">
    <form name="itemForm" novalidate>
        <ul class="sui-breadcrumb">
            <li><a href="#/item/list">{{'Item'| translate}}</a></li>
            <li class="active">{{item.item_id?'edit':'add_new' | translate}}</li>
        </ul>
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b>{{'标签名称'| translate}}：</label>
            <div class="controls">
                <input ng-model="label.name" name="name" type="text" value="" class="input-xlarge" required>
                <div ng-show="itemForm.name.$dirty && itemForm.name.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b>{{'图片'| translate}}：</label>
            <div class="controls">
                <div>
                    <img ng-src="{{label.url}}" style="width:200px;height: 170px">
                </div>
                <label>
                    <br/> 链接：
                    <input ng-model="label.url" type="text" name="name" value="" style="width:100px">
                    <attachment owner-id="item.item_id ?item.item_id:1" owner-type="item" dhf-ng-model="label.url" xtype="url" mult="false" title="Upload" use-type="png,jpeg,gif,jpg,JPG,PNG,JPEG,GIF"></attachment>
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button type="submit" id="submit" class="sui-btn btn-primary" ng-disabled="!itemForm.$valid" ng-click="labelAdd($event)">
                    <span>{{'save' | translate}}</span>
                </button>
            </div>
        </div>
    </form>
</div>